<!DOCTYPE html>
<html>
<head>
    <title>{{ question.question_text }}</title>
    {% load static %}
    <link rel="stylesheet" href="{% static 'polls/css/detail.css' %}">
</head>
<body>
    <header>
        <h1>{{ question.question_text }}</h1>
    </header>
    <main>
        {% if error_message %}
            <p class="error-message"><strong>{{ error_message }}</strong></p>
        {% endif %}
        <form action="{% url 'polls:vote' question.id %}" method="post">
            {% csrf_token %}
            {% for choice in question.choice_set.all %}
                <label class="choice-label">
                    <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" required>
                    <span>{{ choice.choice_text }}</span>
                </label>
            {% endfor %}
            <button type="submit">Vote</button>
        </form>
    </main>
    <footer>
        <p class="copy-right">&copy; 2024 MyPolls</p>
    </footer>
</body>
</html>